package com.ccapton.dragviewdemo;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class WelcomeActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);

        View tv1 = findViewById(R.id.tv1);
        View tv2 = findViewById(R.id.tv2);
        tv1.setOnClickListener(this);
        tv2.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.tv1:
                startActivity(new Intent(WelcomeActivity.this,MainActivity.class));
                break;
            case R.id.tv2:
                startActivity(new Intent(WelcomeActivity.this,DragTagLayoutActivity.class));
                break;
                default:
                    break;
        }
    }
}
